import React from 'react'
import { Icon, Steps } from 'antd'
import style from '../style.module.scss'

const { Step } = Steps

interface SignStepsProps {
    current: number;
}

const SignSteps: React.FC<SignStepsProps> = (props: SignStepsProps) => (
    <Steps>
        <Step status={props.current > 0 ? 'finish' : 'wait'} title="创建队伍" icon={<Icon type="user"/>}/>
        <Step status={props.current > 1 ? 'finish' : 'wait'} title="确认信息" icon={<Icon type="solution"/>}/>
        <Step status={props.current === 2 ? 'finish' : 'wait'} title="完成" icon={<Icon type="smile-o"/>}/>
    </Steps>
)

export const SignHeader: React.FC<SignStepsProps> = (props: SignStepsProps) => (
    <div className={style.signHeader}>
        <SignSteps {...props}/>
    </div>
)
